<?php 
	require_once ("../../config.php");
?>
<html>
<head>
<title>ITControl Masisa</title>
<link rel="stylesheet" href="/itcontrol/com/visual/style.css">
</head>
	<body>
		<div id="div_navbar" align="right">
			<?php 
				# Add div with Navbar
				echo navbar();
			?>
		</div>
		<div id="div_menu" align="left">
			<?php 					
				echo menu();
			?>
		</div>
		<div id="div_form" align="left">
			<form id="form_main" name="form_main" method="post" action="cc_find_db.php">
				<?php 	
					# Array contains that fields that we'll use
					$fields[0] = "nameCC";
					$fields[1] = "cc";
					
					# Array contains the Alias of fields
					$namefields[0] = "Nome";
					$namefields[1] = "CC";
					
					# Array contains that fields that we'll (Option Button)
					$fieldsOpt[0] = "nameUnit";
					
					# Array contains the Alias of fields (Option Button)
					$namefieldsOpt[0] = "Unidade";
					
					# Array contains the Table of the option fields
					$tableOpt[0] = "tb_unit";
					
					# Array contains the Types of the option fields
					$typeOpt[0] = "unit";
					
					# If return doesn't are empty, reload the page with the previous data on input boxes
					# and shows a warning message. Else load page with blank input boxes.
					echo dataOpt("tb_cc", "cc", "find", $fields, $namefields, $tableOpt, $typeOpt, "find", $fieldsOpt, $namefieldsOpt);
					echo menuaction("cc", "find");
				?>
			</form> 
		</div>
	</body>
</html>